Registration of respiratory mechanics